package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.ChannelCompanyAddDTO;
import org.jsola.hr.dto.ChannelCompanyBatchDTO;
import org.jsola.hr.dto.ChannelCompanyUpdateDTO;
import org.jsola.hr.query.ChannelCompanyQuery;
import org.jsola.hr.vo.ChannelCompanyListVO;
import org.jsola.hr.vo.ChannelCompanyVO;

import java.util.List;

/**
 * 渠道用工单位
 *
 * @author zhr
 */
@Api(tags = "hr-渠道用工单位")
public interface IChannelCompanyControllerAPI {

    /**
     * 新增渠道用工单位
     * @param channelCompanyAddDTO 渠道用工单位新增实体
     * @return 渠道用工单位展示对象
     */
    @ApiOperation(value = "新增渠道用工单位")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelCompanyAddDTO", dataType = "ChannelCompanyAddDTO", value = "新增渠道用工单位", paramType = "body")
    })
    Result<ChannelCompanyVO> save(ChannelCompanyAddDTO channelCompanyAddDTO);


    /**
     * 修改渠道用工单位
     * @param channelCompanyUpdateDTO 渠道用工单位
     * @return 更新数量
     */
    @ApiOperation(value = "修改渠道用工单位")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelCompanyUpdateDTO", dataType = "ChannelCompanyUpdateDTO", value = "修改渠道用工单位", paramType = "body")
    })
    Result<Integer> update(ChannelCompanyUpdateDTO channelCompanyUpdateDTO);

    /**
     * 批量编辑、新增、删除渠道用工单位
     * @param channelCompanyBatchDTO 要操作的渠道用工单位
     * @return 操作之后的全部渠道用工单位
     */
    @ApiOperation(value = "批量编辑、新增、删除渠道用工单位")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelCompanyBatchDTO", dataType = "ChannelCompanyBatchDTO", value = "要操作的字段数据", paramType = "body")
    })
    Result batch(ChannelCompanyBatchDTO channelCompanyBatchDTO);



    /**
     * 删除单个渠道用工单位，彻底删除
     * @param channelCompanyId 渠道用工单位id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个渠道用工单位，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelCompanyId", dataType = "String", value = "渠道用工单位id", paramType = "path")
    })
    Result<Integer> delete(String channelCompanyId);


    /**
     * 批量删除渠道用工单位，彻底删除
     * @param channelCompanyIds 渠道用工单位id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除渠道用工单位，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelCompanyIds", dataType = "String[]", value = "渠道用工单位id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] channelCompanyIds);


    /**
     * 根据渠道用工单位id查询渠道用工单位详情
     * @param channelCompanyId 渠道用工单位id
     * @return 渠道用工单位详情
     */
    @ApiOperation(value="根据渠道用工单位id查询渠道用工单位详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelCompanyId", dataType = "String", value = "渠道用工单位id", paramType = "path")
    })
    Result<ChannelCompanyVO> findById(String channelCompanyId);


    /**
     * 查询渠道用工单位
     * @param channelCompanyQuery 渠道用工单位查询参数
     * @return page
     */
    @ApiOperation(value="查询渠道用工单位")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelCompanyQuery", dataType = "ChannelCompanyQuery", value = "渠道用工单位查询参数", paramType = "query")
    })
    Result<List<ChannelCompanyListVO>> listAll(ChannelCompanyQuery channelCompanyQuery);


     /**
     * 分页查询渠道用工单位
     * @param channelCompanyQuery 渠道用工单位查询参数
     * @return page
     */
    @ApiOperation(value="分页查询渠道用工单位")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "channelCompanyQuery", dataType = "ChannelCompanyQuery", value = "渠道用工单位查询参数", paramType = "query")
    })
    Result<Page<ChannelCompanyListVO>> page(ChannelCompanyQuery channelCompanyQuery);


}

